﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/TLFLayout.Master" AutoEventWireup="true" CodeBehind="VehicleDispatchForm.aspx.cs" Inherits="DingHeng.TransportationManagement.WebSite.Biz.VehicleDispatchForm" %>

<%@ Register Src="~/userControls/leftNav.ascx" TagPrefix="uc1" TagName="leftNav" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../resource/script/jquery-ui.js"></script>
    <link href="../resource/css/jquery-ui.css" rel="Stylesheet" />
    <script>
        $(function () {
            setTab("派车单管理", "新建派车单");
        });
    </script>
    <script type="text/javascript">

        function chooseVehicel() {
            $("#<%#this.txtChooseVehicelNo.ClientID%>").val("");
            $("#chooseVehicelWindow").dialog({
                modal: false,
                width: 750,
                height: 700,
                title: "选择车辆"
            });
            $("#chooseVehicelWindow").parent().appendTo("#dialog_target");
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderTop" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderLeft" runat="server">
    <uc1:leftNav runat="server" ID="leftNav" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolderSecondNavigation" runat="server">
    <div class="secondaryNavigation">
        <a href="#">主页</a> >> 
        <asp:Label runat="server" ID="lblHomeTitle"></asp:Label>
    </div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ContentPlaceHolderRight" runat="server">
    <div style="display: none;">
        <%--<ul class="tabul">
            <li class="tabselect"><a href="javascript:;" onfocus="this.blur();" id="Tab1" onclick="showTab('Tab1')">选择车辆</a></li>
            <li><a href="javascript:;" onfocus="this.blur();" id="Tab2" onclick="showTab('Tab2')">添加车辆</a></li>
        </ul>--%>
        <div id="chooseVehicelWindow" class="yui3-cssbase">
            <table class="noborderTable" style="margin-left: 5px">
                <tr>
                    <td style="width: 150px;">车牌号:</td>
                    <td style="width: 200px;">
                        <asp:TextBox runat="server" ID="txtChooseVehicelNo"></asp:TextBox>
                    </td>
                    <td style="width: 250px;">
                        <asp:Button ID="btnSearchVehicel" runat="server" Text="查询" CssClass="btn-common" OnClick="btnSearchVehicel_Click" />
                    </td>

                </tr>
                <tr>
                    <td colspan="3">
                        <asp:GridView Width="650" ID="gridVehicel" runat="server" class="listTable" AutoGenerateColumns="false" DataKeyNames="VehicleID,DriverPhoneNo,OwnerContactNo,LicensePlateNo" OnRowUpdating="gridVehicel_RowUpdating"
                           ShowHeaderWhenEmpty="true" >
                            <Columns>
                                <asp:BoundField HeaderStyle-Width="50" DataField="Code" HeaderText="编号" HeaderStyle-Wrap="False" ItemStyle-Wrap="False">
                                    <HeaderStyle Wrap="False"></HeaderStyle>
                                    <ItemStyle Wrap="False"></ItemStyle>
                                </asp:BoundField>
                                <asp:TemplateField HeaderStyle-Width="200" HeaderStyle-Wrap="False" ItemStyle-Wrap="False">
                                    <HeaderTemplate>车牌号</HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="gridlbtnLicensePlateNo" runat="server" CommandName="Update"><%# Eval("LicensePlateNo")%></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField HeaderStyle-Width="150" DataField="OwnerName" HeaderText="所有人" HeaderStyle-Wrap="False" ItemStyle-Wrap="False">
                                    <HeaderStyle Wrap="False"></HeaderStyle>
                                    <ItemStyle Wrap="False"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField HeaderStyle-Width="150" DataField="DriverName" HeaderText="司机" HeaderStyle-Wrap="False" ItemStyle-Wrap="False">
                                    <HeaderStyle Wrap="False"></HeaderStyle>
                                    <ItemStyle Wrap="False"></ItemStyle>
                                </asp:BoundField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div id="mainContent" style="z-index: 1;">

        <div id="dialog_target">
        </div>
        <table class="noborderTable" style="margin-left: 5px">
            <%--<tr>
                <td style="width: 130px">派车单号:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtCode" ReadOnly="true"></asp:TextBox></td>
            </tr>--%>
            <tr>
                <td>项目名称：</td>
                <td>
                    <asp:TextBox runat="server" ID="txtProjectName"></asp:TextBox></td>
            </tr>
            <tr>
                <td>车牌号:</td>
                <td>

                    <a href="#" class="chooseVehicel" onclick="chooseVehicel()">
                        <asp:TextBox runat="server" ID="txtVehicle" Text="点击选择" ReadOnly="true"></asp:TextBox></a>
                </td>

            </tr>
            <tr>
                <td>车辆编号:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtVehicleCode"  ReadOnly="true"></asp:TextBox>
                </td>

            </tr>
            <tr>
                <td>车辆所有人：</td>
                <td>
                    <asp:TextBox runat="server" ID="txtVehicleOwner"  ReadOnly="true"></asp:TextBox></td>
            </tr>
            <tr>
                <td>联系电话：</td>
                <td>
                    <asp:TextBox runat="server" ID="txtOwnerContactNo" ></asp:TextBox></td>
            </tr>
            <tr>
                <td>司机：</td>
                <td>
                    <asp:TextBox runat="server" ID="txtDriver" ></asp:TextBox></td>
            </tr>
            <tr>
                <td>司机联系电话：</td>
                <td>
                    <asp:TextBox runat="server" ID="txtDriverPhoneNo" ></asp:TextBox></td>
            </tr>
            <tr>
                <td>车队负责人:</td>
                <td>
                    <asp:DropDownList ID="ddlPricipal" runat="server" DataTextField="Name" DataValueField="ID"></asp:DropDownList></td>

            </tr>
            <%--<tr>
                <td>装车地重量（吨）:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtLoadQuantity"></asp:TextBox></td>
            </tr>
            <tr>
                <td>装车现场确认人:</td>
                <td>
                    <asp:DropDownList ID="ddlLoadConfirmUser" runat="server" DataTextField="Name" DataValueField="ID"></asp:DropDownList></td>

            </tr><tr>
                <td>卸车地重量（吨）:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtUnloadQuantity"></asp:TextBox></td>
            </tr>
            <tr>
                <td>卸车现场确认人:</td>
                <td>
                    <asp:DropDownList ID="ddlUnloadConfirmUser" runat="server" DataTextField="Name" DataValueField="ID"></asp:DropDownList></td>

            </tr>--%>
            <tr>
                <td colspan="2">
                    <asp:Button ID="btnSubmit" runat="server" Text="提交" CssClass="btn-submit" OnClick="btnSubmit_Click" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
